/* 地质灾害信息 弹框
* @ 劳兆城 
* @ 2017-08-12*/

<template>
	<interact-model 
		ref="interact-model"
		title="地址灾害信息"
		class="hazard-model">
		<div class="hazard-warpper">
			<div class="hazard-table">
				<table border class="table">
					<tbody>
						<tr>
							<td>编号</td>
							<td>{{fliterData('code')}}</td>
							<td>地址</td>
							<td>{{fliterData('address')}}</td>
						</tr>
						<tr>
							<td>灾害体规模</td>
							<td>{{fliterData('dangerscope')}}</td>
							<td>稳定性</td>
							<td>{{fliterData('dangerfeature1')}}</td>
						</tr>
						<tr>
							<td>潜在危害危害性</td>
							<td>{{fliterData('dangerfeature2')}}</td>
							<td>威胁人数</td>
							<td>{{fliterData('affect_number')}}</td>
						</tr>
						<tr>
							<td>潜在经济损失（万元）</td>
							<td>{{fliterData('lostamount')}}</td>
							<td>引发原因</td>
							<td>{{fliterData('reason')}}</td>
						</tr>
						<tr>
							<td>险情等级</td>
							<td>{{fliterData('dangerlevel')}}</td>
							<td>预案（有/无）</td>
							<td>{{fliterData('haveplanning')}}</td>
						</tr>
						<tr>
							<td>一点一档建档情况（有/无）</td>
							<td>{{fliterData('haveachives')}}</td>
							<td>可控程度（可控或较难控制）</td>
							<td>{{fliterData('iscontrol')}}</td>
						</tr>
						<tr>
							<td>经度</td>
							<td>{{fliterData('lat')}}</td>
							<td>纬度</td>
							<td>{{fliterData('lng')}}</td>
						</tr>
						<tr>
							<td>目前已采取的工作措施</td>
							<td>{{fliterData('measure')}}</td>
							<td>易发分区</td>
							<td>{{fliterData('area1')}}</td>
						</tr>
						<tr>
							<td>防治分区</td>
							<td>{{fliterData('area2')}}</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</interact-model>
</template>

<script>
	import {
		interactModelMixin,
		aPictureModelMixin
	} from 'common/js/mixins'

export default {
		mixins: [
			interactModelMixin,
			aPictureModelMixin
		],
		methods: {
			show (feature, layerNames) {
				this.$refs['interact-model'].showModel()
			if (layerNames) {
					this.data = feature.get('content').info || {}
			} else {
					this.data = feature.get('content') || {}
			}
			}
		}
	}
</script>

<style lang="scss">
	.hazard-model {
		width: 700px;
		height: 540px;
		.hazard-warpper {
			width: 100%;
			height: 100%;
			position: relative;
			padding: 5px;
			.hazard-table {
				width: 100%;
				height: 100%;
				.table {
					width: 100%;
					font-size: 14px;
					border: 1px solid #ddd;
					td {
						width: 25%;
						padding: 5px;
					}
				}
			}
		}
	}
</style>